#被动技能【横行战意】
#被动技能【援速】
execute as @a[tag=wofu,scores={skIron_axe1=1..}] at @s run function nw:yingxiong/3yingxiong/02wofu/skill/0difu
#被动技能【嗜血】
execute as @a[tag=wofu,scores={skGolden_axe1=1..}] at @s run function nw:yingxiong/3yingxiong/02wofu/skill/0shixue

#被动技能【血之饥饿】
item replace entity @a[tag=wofu,scores={skHealth=36..}] armor.head with minecraft:heavy_weighted_pressure_plate{display: {Name: '[{"text":"技能：血之饥饿","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]', Lore: ['{"text":"被动技能【血之饥饿】","color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}', '{"text":"当前生命值高于35","color":"red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}']}, Unbreakable: 1, Enchantments: [{id: "minecraft:binding_curse", lvl: 1}, {id: "minecraft:loyalty", lvl: 10}]} 1
item replace entity @a[tag=wofu,scores={skHealth=26..35}] armor.head with minecraft:heavy_weighted_pressure_plate{AttributeModifiers: [{Operation: 0, Amount: +0.1d, UUID: [I; 564457847, 941141520, -312835874, -694664835], Slot: head, AttributeName: "generic.attack_speed", Name: "generic.attackSpeed"}], display: {Name: '[{"text":"技能：血之饥饿","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]', Lore: ['{"text":"被动技能【血之饥饿】","color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}', '{"text":"当前生命值低于35","color":"red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}']}, Unbreakable: 1, Enchantments: [{id: "minecraft:binding_curse", lvl: 1}, {id: "minecraft:loyalty", lvl: 10}]} 1
item replace entity @a[tag=wofu,scores={skHealth=16..25}] armor.head with minecraft:heavy_weighted_pressure_plate{AttributeModifiers: [{Operation: 0, Amount: +0.2d, UUID: [I; 564457847, 941141520, -312835874, -694664835], Slot: head, AttributeName: "generic.attack_speed", Name: "generic.attackSpeed"}], display: {Name: '[{"text":"技能：血之饥饿","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]', Lore: ['{"text":"被动技能【血之饥饿】","color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}', '{"text":"当前生命值低于25","color":"red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}']}, Unbreakable: 1, Enchantments: [{id: "minecraft:binding_curse", lvl: 1}, {id: "minecraft:loyalty", lvl: 10}]} 1
item replace entity @a[tag=wofu,scores={skHealth=8..15}] armor.head with minecraft:heavy_weighted_pressure_plate{AttributeModifiers: [{Operation: 0, Amount: +0.3d, UUID: [I; 564457847, 941141520, -312835874, -694664835], Slot: head, AttributeName: "generic.attack_speed", Name: "generic.attackSpeed"}], display: {Name: '[{"text":"技能：血之饥饿","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]', Lore: ['{"text":"被动技能【血之饥饿】","color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}', '{"text":"当前生命值低于15","color":"red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}']}, Unbreakable: 1, Enchantments: [{id: "minecraft:binding_curse", lvl: 1}, {id: "minecraft:loyalty", lvl: 10}]} 1
item replace entity @a[tag=wofu,scores={skHealth=0..7}] armor.head with minecraft:heavy_weighted_pressure_plate{AttributeModifiers: [{Operation: 0, Amount: +0.4d, UUID: [I; 564457847, 941141520, -312835874, -694664835], Slot: head, AttributeName: "generic.attack_speed", Name: "generic.attackSpeed"}, {Operation: 0, Amount: +1.5d, UUID: [I; 664945345, -2071468452, -379930110, -715823917], Slot: head, AttributeName: "generic.attack_damage", Name: "generic.attackDamage"}, {Operation: 1, Amount: 0.1d, UUID: [I; 639566960, -1360525983, -372197467, -769600235], Slot: head, AttributeName: "generic.movement_speed", Name: "generic.movementSpeed"}], display: {Name: '[{"text":"技能：血之饥饿","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]', Lore: ['{"text":"被动技能【血之饥饿】","color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}', '{"text":"当前生命值低于7","color":"red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}']}, Unbreakable: 1, Enchantments: [{id: "minecraft:binding_curse", lvl: 1}, {id: "minecraft:loyalty", lvl: 10}]} 1

#主动技能【远祖嗥叫】
execute as @a[tag=wofu,scores={skEXBottle=1..}] run item replace entity @s armor.feet with minecraft:leather_boots{AttributeModifiers: [{Operation: 0, Amount: +10, UUID: [I; 697266226, 1238080983, -452271483, -1569510271], Slot: feet, AttributeName: "generic.knockback_resistance", Name: "generic.knockbackResistance"}, {Operation: 0, Amount: +1.5d, UUID: [I; 532925756, -623131596, -363145628, 998247265], Slot: feet, AttributeName: "generic.attack_damage", Name: "generic.attackDamage"}, {Operation: 0, Amount: +2, UUID: [I; 576412148, 1149417769, -301629452, -856836903], Slot: feet, AttributeName: "generic.armor", Name: "generic.armor"}], Unbreakable: 1, display: {color: 14277081}, Tags: ["冲啊"]} 1
execute as @a[tag=wofu,scores={skEXBottle=1..}] run scoreboard players set @s[scores={EFUnControl=0}] EFUnControl 120
execute as @a[tag=wofu,scores={skEXBottle=1..}] run scoreboard players remove @s[scores={EFUnControl=..-1}] EFUnControl 120
execute as @a[tag=wofu,scores={skEXBottle=1..}] run tellraw @a [{"selector":"@s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"：释放技能","color":"blue","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"【远祖嗥叫】","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"—沃夫","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
execute as @a[tag=wofu,scores={skEXBottle=1..}] run scoreboard players set @s skCDEXBottle 30
execute as @a[tag=wofu,scores={skEXBottle=1..}] run scoreboard players reset @s skEXBottle

#主动技能【远祖嗥叫】效果
execute as @a[tag=wofu,scores={EFUnControl=..-1}] at @s rotated ~ 0 positioned ^ ^ ^-0.5 run particle minecraft:totem_of_undying ~ ~ ~ 0.3 1 0.3 0.01 2
execute as @a[tag=wofu,scores={EFUnControl=..-1}] at @s rotated ~ 0 positioned ^ ^ ^-0.5 run particle minecraft:lava ~ ~ ~ 0.2 0.5 0.2 0.1 1
execute as @a[tag=wofu,scores={EFUnControl=..-1}] at @s rotated ~ 0 positioned ^ ^ ^-0.5 run particle minecraft:flame ~ ~ ~ 0.2 0.5 0.2 0.1 1
execute as @a[tag=wofu,scores={EFUnControl=..-1}] at @s rotated ~ 0 positioned ^ ^ ^5 if entity @a[distance=0..4.9] run effect give @s speed 1 0 true
clear @a[tag=wofu,scores={EFUnControl=-1}] leather_boots{Tags:["冲啊"]}
item replace entity @a[tag=wofu,scores={EFUnControl=-1}] armor.feet with minecraft:leather_boots{AttributeModifiers: [{Operation: 0, Amount: +2, UUID: [I; 576412148, 1149417769, -301629452, -856836903], Slot: feet, AttributeName: "generic.armor", Name: "generic.armor"}], Unbreakable: 1, display: {color: 14277081}} 1

#主动技能【远祖嗥叫】CD
execute as @a[tag=wofu,scores={skCDEXBottle=..0}] run clear @s experience_bottle
execute as @a[tag=wofu,scores={skCDEXBottle=..0}] run item replace entity @s weapon.offhand with minecraft:experience_bottle{display: {Name: '[{"text":"技能：远祖嗥叫","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]', Lore: ['{"text":"主动技能【远祖嗥叫】","color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}', '{"text":"使用后获得免控6s 与+1.5攻击力","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}', '{"text":"期间向玩家移动时获得速度I","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}', '{"text":"冷却时间：30s","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}']}, Enchantments: [{id: "minecraft:loyalty", lvl: 10}]} 1
scoreboard players reset @a[tag=wofu,scores={skCDEXBottle=..0}] skCDEXBottle

#C02沃夫（异狼裔）
execute as @a[tag=wofu] run title @s actionbar [{"text":"远祖嗥叫","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDEXBottle","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
